package com.cloud.common.shield.model;

import com.cloud.common.shield.ShieldField;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

/**
 * 域信息
 *
 * @author wangjian
 * @version 1.0.0
 * @create 2020年10月21日 14:32
 * Life is so short,do something to make yourself happy,such as coding
 */
public class FieldDefinition {

    /**
     * 域
     */
    private Field field;

    /**
     * ShieldField注解信息
     */
    private ShieldField shieldField;

    /**
     * 访问域的Method
     */
    private Method fieldAccessMethod;

    /**
     * 默认构造函数
     */
    public FieldDefinition() {
        super();
    }

    /**
     * 构造函数
     *
     * @param field
     * @param shieldField
     */
    public FieldDefinition(Field field, ShieldField shieldField, Method fieldAccessMethod) {
        super();
        this.field = field;
        this.shieldField = shieldField;
        this.fieldAccessMethod = fieldAccessMethod;
    }

    public Field getField() {
        return field;
    }

    public void setField(Field field) {
        this.field = field;
    }

    public ShieldField getShieldField() {
        return shieldField;
    }

    public void setShieldField(ShieldField shieldField) {
        this.shieldField = shieldField;
    }

    public Method getFieldAccessMethod() {
        return fieldAccessMethod;
    }

    public void setFieldAccessMethod(Method fieldAccessMethod) {
        this.fieldAccessMethod = fieldAccessMethod;
    }

}
